#include<stdio.h>
int q_jc(int x)
{
	if (x <= 1)
		return 1;
	else
		return x * q_jc(x - 1);
}
int main()
{
	int n = 0;
	int re = 0;
	scanf_s("%d", &n);
	re=q_jc(n);
	printf("%d", re);
	return 0;
}
